<template>
	<view class="detail_content">
		<view class="title bold">{{noticeDetail.title}}</view>
		<view class="detail_text" v-html="noticeDetail.detail"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				noticeDetail:{
					title:'公告名称',
					detail:''
				}
			};
		},
		onLoad(option) {
			if(option.id){
				this.id = option.id;
			}
		},
		onShow() {
			this.getBNoticeDetail();
		},
		methods:{
			async getBNoticeDetail(){
				const _this = this;
				let res = (await _this.$http('/cms/auth/communique/getCommunique','POST',_this.id)).data;
				if(res && res.code == '0'){
					_this.noticeDetail = res.data;
				}else{
					_this.$showToast(res.msg);
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.detail_content{
		box-sizing: border-box;
		width: 100%;
		min-height: 100vh;
		background-color: #F8F8F8;
		padding: 24rpx;
		.title{
			width: 100%;
			text-align: center;
			font-size: 36rpx;
		}
		.detail_text{
			margin-top: 100rpx;
			text-indent: 50rpx;
		}
	}
</style>
